define(['angular', 'store'], function (angular, store) {
    "use strict";

    var factory = function ($location, $http, $q, $sce, WT_BASE_PATH, WZ_BASE_PATH, CommonService) {
        return {
            init: function (data) {
                return CommonService.ajax({//身份证有效期修改记录初始化
                    isReject: true,
                    url: '/biz/basicInfo/initForUpdateIdcardTerm',
                    type: 'get'
                });
            },
            getRecordStatus: function (data) {//身份证有效期修改记录状态
                return CommonService.ajax({
                    isReject: true,
                    url: '/biz/basicInfo/getIdcardTermRecordStatus',
                    type: 'get'
                });
            },
            getPhotoInfo: function (data) {//身份证有效期修改上传（客户临时档案）
                return CommonService.ajax({
                    isReject: true,
                    url: '/biz/basicInfo/uploadArchBase64ToFdfs',
                    type: 'post',
                    data: data
                });
            },
            uploadSumbit: function (data) {//身份证有效期修改提交
                return CommonService.ajax({
                    isReject: true,
                    url: '/biz/basicInfo/idcardTermUploadSumbit',
                    type: 'post',
                    data: data
                });
            },
            initCheck: function (data) {
                return CommonService.ajax({//身份证核对记录初始化
                    isReject: true,
                    url: '/biz/basicInfo/initForUpdateIdcardCheck',
                    type: 'post',
                    data: {
                        business_type: 1,
                        business_info:data
                    }
                });
            },
            getCheckRecordStatus: function (data) {//身份证核对记录状态
                return CommonService.ajax({
                    isReject: true,
                    url: '/biz/basicInfo/getIdcardCheckRecordStatus',
                    type: 'post',
                    data: {
                        business_type: 1
                    }
                });
            },
            getCheckPhotoInfo: function (data) {//身份证核对上传（客户临时档案）
                return CommonService.ajax({
                    isReject: true,
                    url: '/biz/basicInfo/uploadArchBase64ToFdfsForCheck',
                    type: 'post',
                    data: data
                });
            },
            uploadCheckSumbit: function (data) {//身份证核对提交
                return CommonService.ajax({
                    isReject: true,
                    url: '/biz/basicInfo/idcardCheckUploadSumbit',
                    type: 'post',
                    data: data
                });
            },
            uploadIDCard: function (data) {//身份证上传（客户档案）
                return CommonService.ajax({
                    isReject: true,
                    url: '/biz/account/uploadArchBase64',
                    type: 'post',
                    data: data
                });
            }
        }
    };

    factory.$inject = ['$location', '$http', '$q', '$sce', 'WT_BASE_PATH', 'WZ_BASE_PATH', 'CommonService'];
    return factory;
});